Method and Device for Preparing Error Map and Numerically Controlled Machine Tool Having Error Map Preparation Function

ABSTRACT

In a numerically controlled machine tool which has a linear feed axis and a rotational feed axis and in which a main spindle and a table are movable relative to each other, a position error and an attitude error produced by an operation of a linear feed axis and a rotational feed axis are measured at a plurality of measurement points set within a movable range of the linear feed axis and the rotational feed axis, and the position error and the attitude error thus measured are stored as an error map in correspondence to a position of the linear feed axis and a rotation angle of the rotational feed axis.

FIELD OF THE INVENTION

The present invention relates to measurement and correction of an errorin a numerically controlled machine tool which has a linear feed axisand a rotational feed axis and in which a main spindle and a table aremovable relative to each other.

BACKGROUND ART

In a machine tool which has a linear feed axis and a rotational feedaxis, it is generally difficult to position a tool at a desired positionsince an error may occur when the feed axes are moved in accordance witha movement command. Therefore, when highly precise processing isdesired, correction has to be carried out depending on the machineerror. In order to carry out the correction, the machine error needs tobe measured accurately as a preliminary step of correction. Thefollowing documents disclose the prior art of measurement and correctionof errors.

In Japanese Patent Publication of Examined Patent Application (KokokuPublication) No. H06-088192 (JP-H06-088192 B1), a method is disclosed inwhich deviations of two rotational feed axes (deviation of the positionof the center of axes) of a machine tool which has two rotational feedaxes (A, B) that are orthogonal to each other are measured in advance,and coordinates of the two rotational feed axes are determined by takingthese deviations into account.

In Japanese Patent Publication of Unexamined Patent Application (KokaiPublication) No. 2004-272887 (JP-2004-272887-A1), a method is disclosedin which, in a machine tool which has three linear feed axes (X, Y, Z)that are orthogonal to each other and two rotational feed axes (A, C)that are orthogonal to each other, the position to which the machine hasto be actually moved is determined based on deviations of the center ofa rotating shaft or the center of turning of a spindle, and by usingdrive control means, the linear feed axes and the rotational feed axesare moved to the determined position so as to correct the position ofthe tool tip.

In Japanese Patent Publication of Unexamined Patent Application (KokaiPublication) No. H09-237112 (JP-09-237112-A1), a method is disclosed inwhich an error of a tool unit of a machine tool having a parallel linkmechanism is corrected based on an error map. The error map has errordata corresponding to each lattice point that have been calculated bycomputation from the difference between the command value of a positionand a posture for tool tip of the tool unit and the measured value ofthem.

In the pamphlet of WO 2004/034164, a system and a process for measuring,correcting and testing numerically controlled machine tool heads and/ortables are disclosed which are automated and integrated in a numericallycontrolled system. This system comprises at least one support base thatis equipped with a plurality of distance sensors, and at least onedevice of gauge tool type that is equipped with connection means for theheads at one of its ends and with a ball at another opposite end. Theball is placed next to the distance sensors, so that the distancesensors are able, at any time and in any position, to move to anyposition in order to measure the distance that separates them from theball, and to thereby determine the position in the Cartesian space.

In the correction methods disclosed in JP-H06-088192 B1 andJP-2004-272887 A1, deviation of the rotational axis is corrected. Thus,there is a problem that errors or the like which vary depending on theundulation of the rotational axis itself or on the position of thelinear feed axis cannot be corrected. The error map disclosed inJP-H09-237112 A1 is the error of the tip of a tool unit that is drivenby a parallel link mechanism obtained as table data. Thus, there is aproblem that this method is not applicable to a machine tool which has alinear feed axis and a rotational feed axis. In the measurement methoddisclosed in the pamphlet of WO 2004/034164, only the center position ofa reference ball is measured, so that there is a problem that deviationof the position of the tool tip produced due to an error of the postureof the main spindle relative to the table due to variation of the toollength or projecting length of the tool cannot be corrected.

DISCLOSURE OF THE INVENTION

The present invention aims to resolve above-described problemsassociated with prior art, and therefore, it is an object of the presentinvention to provide a method and a device for preparing an error map inorder to correct with high precision a machine tool error which has alinear feed axis and a rotational feed axis, and a numericallycontrolled machine tool having an error map preparation function.

In order to attain above-described object, in accordance with thepresent invention, there is provided a method for preparing an error mapof a numerically controlled machine tool which has a linear feed axisand a rotational feed axis and in which a main spindle and a table aremovable relative to each other, the method comprising steps of; defininga plurality of measurement points in the movable range of the linearfeed axis and the rotational feed axis, measuring the relative positionand the relative attitude of the main spindle relative to the table atthe defined measurement points, determining a position error and/or anattitude error at each measurement point from the measured relativeposition and/or relative attitude and the command data for positioningthe feed axes, and storing the position error and the attitude errorcorresponding to the position of the linear feed axis and the rotationangle of the rotational feed axis.

In accordance with the present invention, there is also provided amethod for preparing an error map, wherein, in the step of defining aplurality of measurement points, plural measurement regions are definedin the movable range of the linear feed axis, and the measurement pointsare defined in each measurement region such that at least onemeasurement point in each measurement region is defined so as to have asame coordinate position of the linear feed axis as a measurement pointin adjacent measurement region.

In accordance with the present invention, there is also provided amethod for preparing an error map, wherein, in the step of defining aplurality of measurement points, the measurement points are defined suchthat separation between adjoining measurement points is constanteverywhere, or a difference in the position error or the attitude errorbetween adjoining measurement points is constant everywhere.

In accordance with the present invention, there is also provided amethod for preparing an error map, wherein, in the step of measuringrelative position or relative attitude, a reference ball having knownouter dimension provided on one of the main spindle and the table and ameasuring device having a displacement sensor provided on the other areused, and while the linear feed axis is controlled such that relativeposition of the center of the reference ball and the displacement sensordoes not change theoretically when the rotational feed axis is operated,the rotational feed axis is positioned at a plurality of measurementpoints, and displacement of position of the reference ball is measuredwith the displacement sensor at each measurement point to determine therelative position and the relative attitude from the displacement thusmeasured and the coordinate value at the time of measurement.

In accordance with the present invention, there is also provided amethod for preparing an error map, wherein, in the step of measuring therelative position or the relative attitude, a test piece or a work pieceattached to the table is processed with the rotational feed axispositioned at a plurality of rotation angles, and displacement of theprocessed surface obtained when the rotational feed axis is positionedat one of the plural rotation angles and the test piece or work piece isprocessed at the one rotation angle and the processed surface obtainedwhen processed at another rotation angle is measured to determine therelative position and the relative attitude from the displacement thusmeasured and the coordinate value at the time of measurement.

In accordance with the present invention, there is also provided amethod for preparing an error map, wherein, in the step of measuring therelative position or the relative attitude, three surfaces of a testpiece or a work piece attached to the table are processed with therotational feed axis positioned at a plurality of rotation angles,difference of position and difference of inclination between the threeprocessed surfaces obtained when the rotational feed axis is positionedat one of the plurality of rotation angles and is processed at therotation angle and the three processed surfaces obtained when processedat another rotation angle are measured with a touch probe mounted on themain spindle to determine the relative position and the relativeattitude from the difference of position and difference of inclinationthus measured and the coordinate value of the machine at the time ofmeasurement.

In accordance with the present invention, there is also provided amethod for preparing an error map for a numerically controlled machinetool which has a linear feed axis and a rotational feed axis and inwhich a main spindle and a table are movable relative to each other, themethod comprising the steps of; defining a plurality of measurementpoints in the movable range of the linear feed axis and the rotationalfeed axis, positioning at the defined measurement points the rotationalfeed axis at plural rotation angles and, at each of the positionedrotation angles, processing three mutually orthogonal surfaces of a testpiece or a work piece in the form of rectangular parallelepiped attachedto the table, determining the attitude error at each rotation angle bymeasuring the inclination of the processed surfaces obtained when therotational feed axis is positioned at one of the plural rotation anglesand the test piece or work piece is processed at the one rotation anglerelative to that obtained by positioning at another rotation angle,measuring the processed surfaces of the processed test piece or workpiece, and at each rotation angle, determining the position ofintersection point of three planes containing the processed surfacesprocessed at the rotation angle, determining the position error at eachmeasurement point from the difference of position between theintersection point of three planes containing the processed surfacesobtained when the rotational feed axis is positioned at one of therotation angles and the test piece or work piece is processed at the onerotation angle and the intersection point of three planes containing theprocessed surfaces obtained when positioned and processed at anotherrotation angle and the determined attitude difference, and storing theposition error and the attitude error in correspondence to the positionof the linear feed axis and the rotation angle of the rotational feedaxis.

In accordance with the present invention, there is also provided amethod for preparing an error map of a numerically controlled machinetool which has a linear feed axis and a rotational feed axis and inwhich a main spindle and a table are movable relative to each other, themethod comprising the steps of; defining a plurality of measurementpoints in the movable range of the linear feed axis and the rotationalfeed axis, positioning at the defined measurement points the rotationalfeed axis at plural rotation angles and, at each of the positionedrotation angles, processing three mutually orthogonal surfaces of a testpiece or a work piece in the form of rectangular parallelepiped attachedto the table, measuring the processed surfaces of the processed testpiece or work piece to determine, for each rotation angle, theinclination of processed surfaces processed at the rotation angle andthe position of the intersection point of the three planes containingthe processed surfaces, determining the attitude error at eachmeasurement point from the difference between the inclination of theprocessed surfaces obtained when the rotational feed axis is positionedat one of the plural rotation angles and the test piece or the workpiece is processed at the one rotation angle and the inclination of theprocessed surfaces obtained when positioned and processed at otherrotation angle, determining the position error at each measurement pointfrom the difference between the position of the intersection point ofthe three planes containing the processed surfaces obtained when therotational feed axis is positioned at the one of the plural rotationangles and the test piece or the work piece is processed at the onerotation angle and the position of the intersection point of the threeplanes containing the processed surfaces obtained when positioned andprocessed at an other rotation angle and the determined attitude error,and storing the position error and the attitude error in correspondenceto the position of the linear feed axis and the rotation angle of therotational feed axis.

In accordance with the present invention, there is also provided adevice for preparing an error map for a numerically controlled machinetool which has a linear feed axis and a rotational feed axis and inwhich a main spindle and a table are movable relative to each other, thedevice comprising; a measurement device having a reference ball providedon one of the main spindle and the table and a sensor provided on theother for measuring the position of the reference ball with the sensorat desired measurement points, a computation section for computing theposition error and the attitude error of the main spindle and the tablebased on measurement data measured with the measurement device and thecoordinate values of the measurement points, and a storage section forstoring the position error and the attitude error which are computed bythe computation section in correspondence to the position of the linearfeed axis and the rotation angle of the rotational feed axis at themeasurement point.

In accordance with the present invention, there is also provided, in anumerically controlled machine tool which has a linear feed axis and arotational feed axis and in which a main spindle and a table are movablerelative to each other, a numerically controlled machine tool havingerror map preparation function comprising; a measurement device having areference ball provided on one of the main spindle and the table and asensor provided on the other for measuring the position of the referenceball with the sensor at desired measurement points, a computationsection for computing the position error and the attitude error of themain spindle and the table based on measurement data measured with themeasurement device and the coordinate values of the measurement points,and a storage section for storing the position error and the attitudeerror which are computed by the computation section in correspondence tothe position of the linear feed axis and the rotation angle of therotational feed axis at the measurement point.

Also, in accordance with the present invention, there is provided, inwhich has a linear feed axis and a rotational feed axis and in which amain spindle and a table are movable relative to each other, anumerically controlled machine tool having error map preparationfunction comprising; a measurement device having a test piece or workpiece attached to the table and a sensor provided on the main spindlefor measuring the processed surface of the test piece or work piece at adesired measurement point, a computation section for computing theposition error and the attitude error of the main spindle and the tablebased on measurement data measured with the measurement device and thecoordinate values of the measurement points, and a storage section forstoring the position error and the attitude error which are computed bythe computation section in correspondence to the position of the linearfeed axis and the rotation angle of the rotational feed axis at themeasurement point.

Also, in accordance with the present invention, there is provided anumerically controlled machine tool having error map preparationfunction, wherein the numerically controlled machine tool furthercomprises a correction section which corrects the command position orposition command for the linear feed axis or the rotational feed axisbased on the position error and the attitude error stored in the storagesection.

In accordance with the method and the device for preparing an error mapand a numerically controlled machine tool having error map preparationfunction of the present invention, an error map can be prepared bymeasuring the position error and the attitude error of the numericallycontrolled machine tool which has a linear feed axis and a rotationalfeed axis. In an error map prepared in accordance with the presentinvention, error data for the position error and the attitude error thatchange as the feed axes are moved are stored separately, and theposition command is corrected based on the error data. Therefore, inaccordance with the present invention, even when the tool length or thetool projecting length varies, the tool tip or the processing point ofthe tool can be positioned to the target position with high precision.In case where measurement points are set such that the coordinateposition of the linear feed axis is the same in adjoining measurementregions, influence of mounting error of the measurement device can beeliminated. In case where separation between adjoining measurementpoints is set such that the difference of error is constant everywhere,the amount of data of the error map can be reduced while maintaining theprecision of correction. In case where an error map is prepared bymeasuring the processed test piece or work piece, errors produced due todeflection of the main spindle or the tool due to rotation of the mainspindle, flexure of the machine or the tool due to load, or the like,can be corrected.

In the present invention, the term “command position” refers to theposition of the destination point of the feed axis commanded by aprocessing program, and the term “position command” refers, from amongthe command pulses issued from the interpolation section to the servosection based on command position, command velocity, and the like, tothe command for controlling the position of the feed axis.

BRIEF DESCRIPTION OF DRAWINGS

Above and other objects, features and advantages of the presentinvention will become more apparent from the following description ofpreferred embodiments with reference to appended drawings, in which:

FIG. 1 is a side view showing a numerically controlled machine toolaccording to the present invention;

FIG. 2 is a block diagram showing a numerical control device of thenumerically controlled machine tool according to an embodiment of thepresent invention;

FIG. 3 is a view of lattice points in 3-dimensional Cartesian coordinatespace;

FIG. 4 is a view of 2-dimensional data sheet (map data) associated witheach lattice point of FIG. 3;

FIG. 5 is a view of a reference ball attached to the tip of a tool as itis measured with a measurement device mounted on a palette;

FIG. 6 is a view showing the measurement range of reference balls havingsupport shafts of different length as seen from the direction of Y-axis;

FIG. 7 is a view of a method for determining plural measurement regions;

FIG. 8 is a flow chart useful for explaining a first measurement methodfor measuring a position error and an attitude error;

FIG. 9 is a detailed flow chart showing M3 of the flow chart of FIG. 8;

FIG. 10 is a view of the attitude error expressed in two variables;

FIG. 11 is a view showing an example of a spindle rotation type machinehaving a reference ball attached to the palette side and a measurementdevice mounted on the main spindle side;

FIG. 12 is a view showing an example of a table rotation type machinehaving a measurement device mounted on the table and a reference ballattached to the main spindle;

FIG. 13 is a flow chart of a second measurement method for measuring aposition error and an attitude error;

FIG. 14 is a view of a state in which each surface is processed onlywith operation of the linear feed axes;

FIG. 15 is a developed view of five surfaces of a rectangularparallelopiped showing the area to be processed for each indexed angle;

FIG. 16 is a view of a state in which a work piece is processed into alattice-like face at the indexed angle for the rotational feed axes B,C;

FIG. 17 is a view of a state in which each measurement surface indexedat a specified angle is being measured;

FIG. 18 is a view of a method for determining an intersection point ofthree planes; and

FIG. 19 is a flow chart showing an example of correction method using anerror map.

BEST FORM FOR IMPLEMENTING THE INVENTION

The present invention will be described below with reference to appendeddrawings showing preferred embodiments thereof. A numerically controlledmachine tool according to the present invention comprises a numericalcontrol device for controlling an operation of a machine in accordancewith a processing program. In FIG. 1, the construction of a five-axishorizontal type machining center having two rotational feed axes on themain spindle side, is shown. Referring to FIG. 1, machining center 1comprises bed 2 provided on the floor, column 3 that is erected on bed 2and is capable of being moved linearly in a direction of Z-axis, andmain spindle stock 5 that is capable of being moved linearly in adirection of Y-axis which is perpendicular to the direction of column 3.On main spindle stock 5, a bracket 5 a is supported rotatably aboutC-axis which is parallel to Z-axis. On bracket 5 a, main spindle head 4is supported rotatably about A-axis which is parallel to X-axis. On mainspindle head 4, a main spindle for holding a tool is rotatablysupported.

Machining center 1 is erected on bed 2 at a position opposed to mainspindle head 4, and comprises table 6 that is capable of being movedlinearly in a direction of X-axis which is perpendicular to the papersurface. work piece 7 is held via angle plate (equerre) 8 on table 6.

FIG. 2 is a block diagram showing the construction of numerical controldevice 20 that controls the position of feed axes of the machine tool.

Numerical control device 20 shown in FIG. 2 has the function ofcorrecting position error and attitude error of the machine tool, andcomprises reading and interpreting section 22 that reads and interpretsprocessing program 21 to compute a command velocity and a commandposition for each feed axis, interpolating section 23 that computescommand pulses based on the command position, command velocity, and thelike to perform linear interpolation or circular interpolation of feedfor each feed axis, position command recognition means 24 that obtainsthe command pulses and recognizes a position command for each feed axis,a computation section that computes a position error and an attitudeerror for a measurement point based on measurement data measured withmeasurement device 50 and the coordinates of the measurement point,error data storage means 25 that store the position error and theattitude error computed by the computation section in correspondence tothe position of the linear feed axis and the rotation angle of therotational feed axis, correction data computing section 26 that computescorrection data for correcting the position command from the positioncommand and the error data stored in error data storage means 25,correction pulse computation means 27 that determine a correction pulsefor correcting the position command based on the correction data, andaddition means 28 that output the pulse obtained by adding thecorrection pulse to the command pulse to servo section 29.

Motor 30 for each feed axis is driven by the drive current which isamplified by servo section 29 to thereby move the feed axis. Servosection 29 controls based on the velocity feedback from motor 30 and theposition feedback from an unshown position detecting device such thateach feed axis is moved at desired velocity to desired position.

The present invention also includes a device that is constructed suchthat the command position is obtained from reading and interpretingsection 22 for correction, and the corrected command position isinputted into the interpolation section for the motor to move themachine to desired position.

Next, a method for preparing an error map will be described. In an errormap, as shown in FIG. 3, lattice points 31 are set at desired positionsin a direction of each axis of linear feed axes X, Y, Z in Cartesiancoordinate system, and 2-dimensional array data 33 corresponding to therotation angle of the rotational feed axes are associated withrespective lattice points as shown in FIG. 4. Thus, an error map iscomposed as 5-dimensional array data of X, Y, Z, A, C.

An error map is composed of plural error data 34 obtained by measurementwith each feed axis positioned at desired measurement points. Error data34 are composed of position error 34 a and attitude error 34 b.

Position error 34 a refers to an error in relative position of the mainspindle relative to the table, that is, an error of the positionexpressed as 3-dimensional coordinate value (x, y, z) produced when thefeed axes are positioned at specified positions or rotation angles. Thatis, a position error is the difference between the theoretical positioncommanded by the position command and the actual position.

Attitude error 34 b refers to an error in relative attitude of the mainspindle relative to the table, that is, an error expressed asinclination angles produced when the feed axes are positioned atspecified positions or rotation angles. Thus, an attitude error is thedifference between the theoretical inclination commanded by the positioncommand and the actual inclination.

Measurement spacing of error data 34 is set such that the difference ofposition error 34 a or attitude error 34 b between adjoining measurementpoints becomes equal to a specified value. In other words, if thedifference of error between adjoining measurement points is small, themeasurement spacing is broadened, and if the difference of error islarge, the measurement spacing is narrowed. By broadening themeasurement spacing in the portion of small difference of error, amountof data can be reduced and load on memory can be thereby reduced. Bynarrowing the measurement spacing in the portion of large difference oferror, precision of the correction of error can be kept high.

Next, an example of measurement method for measuring position error 34 aand attitude error 34 b of a machine tool which has rotational feed axesA, C on the main spindle side, will be described. As shown in FIGS. 5and 6, measurement device 50 is mounted via support shaft 40 to the mainspindle of the spindle rotation type machine tool, and comprisesreference ball 52 which has known values of outer dimension and ofdistance L1, L2 from the control point to ball center P1, P2, and sensorbracket 53 which is mounted on palette 54 fixed to the table and hasnon-contact type sensors 55 in X-direction, Y-direction, Z-direction.The non-contact type sensor 55 can measure the distance to the referenceball 52 in each direction in non-contacting manner. The sensor of thepresent invention includes not only non-contact type sensor but alsocontact type sensor.

Measurement is performed by dividing the measurement range of rotationalfeed axis A, C in even pitch or in uneven pitch, and operating, at thesame time, the linear feed axis so as to maintain the center position ofreference ball 52 at each division point (measurement point). As usedherein, the term “even pitch” means that a measurement point is definedat every specified angle so that an angular separation between adjoiningmeasurement points is everywhere equal, and the term “uneven pitch”means that error data are obtained only at points where error exceeds acertain defined value so that an angular separation between adjoiningmeasurement points is generally unequal.

As shown in FIG. 9, center position P1 of reference ball 52 is measuredin directions X, Y, Z that are orthogonal to each other usingmeasurement device 50 equipped with non-contact type sensors 55. Inorder to determine actual relative attitude and actual control point,the reference ball having support shaft 40 of different length isattached as shown in FIG. 6, and center position P2 of reference ball 52is measured again. By attaching support shafts 41 a, 41 b of differentlengths for measurement, relative attitude of the main spindle and thetable can be determined.

The present invention includes the use of a support shaft whose lengthcan be adjusted. In the present embodiment, the control point is set atthe intersection point of the rotation center of first rotational feedaxis C and the rotation center of second rotational feed axis A. As usedherein, the term “relative attitude” refers to the relative inclinationof the main spindle and the table.

Sensor bracket 53 of measurement device 50 is mounted rotatably about anaxis that is parallel to Z-axis. Thus, when measurement is to beperformed over entire 360 degrees, the sensor bracket can be rotatedabout the axis that is parallel to Z-axis by 90 degrees four times toperform measurement.

As shown in FIGS. 7 and 8, when the region to be measured is large,measurement can be performed by dividing the region into pluralmeasurement regions. In this case, in first measurement region 70 a,which is to be used as a reference, operating ranges of linear feed axesX, Y, Z are measured with a laser gauge, an indicator, or the like, andadjustment is performed to obtain adequate precision as required. Thepresent invention includes a case where adjustment of the precision ofthe operating ranges of linear feed axes X, Y, Z in first measurementregion 70 a is not performed, and error is computed taking into accountthe result of the measurement. This is intended to restrict the resultof measurement in first measurement region 70 a to the error producedwhen rotational feed axes A, C are rotated.

The measurement points in measurement regions 70 a, 70 b are definedsuch that there exists at least one measurement points 71 having thesame coordinate value of the linear feed axes as the measurement pointsin the adjoining measurement region. This is because an error inmounting measurement device 50 should not influence the result ofmeasurement between first measurement region 70 a and other measurementregion 70 b.

The error in mounting measurement device 50 can be determined bysubtracting the error due to difference of the rotation angle of therotational feed axes from the difference of the result of measurementbetween measurement points having same coordinate value of the linearfeed axes. By subtracting this error in mounting from the result ofmeasurement in each measurement region, same result of measurement canbe obtained as if all the measurement regions are measured in one properarrangement.

Next, a method for computing the position error and the attitude errorwill be described. First, the attitude error is determined as follows.Commanded relative inclination of the main spindle relative to the tableis determined from the command value of the rotation angles ofrotational feed axes A, C. Here, the angle formed by the rotation axisof the main spindle and the normal (perpendicular line) to the workpiece attaching surface of the angle plate (equerre) is taken as therelative attitude of the main spindle and the table. From centerpositions P1, P2 of reference ball 52 at two measured points, a line isdetermined that passes through points P1, P2, and the angle formed bythis line and the normal to the work piece attaching surface of theangle plate (equerre) is taken as the actual relative inclination of themain spindle relative to the table. Difference between the commandedrelative inclination of the main spindle relative to the table and theactual relative inclination of the main spindle relative to the table isdetermined as the attitude error. The attitude error is expressed by theangle difference i relative to Z-axis as seen from X-axis direction, theangle difference j relative to Z-axis as seen from Y-axis direction, andthe angle difference k relative to Y-axis as seen from Z-axis direction.The present invention includes a case where, as shown in FIG. 10, theattitude error is expressed by two angles I, J.

Next, the position error is determined as follows. In the presentembodiment, the control point is set at the intersection point of therotation center of first rotational feed axis C and the rotation centerof second rotational feed axis A. Thus, to whatever rotation angle therotational feed axes are moved, the theoretical position of the controlpoint does not change. The commanded position of the control point isdetermined from the command values of linear feed axes X, Y, Z. Theposition of the control point refers to the relative position of thereference point of the table relative to the control point of the mainspindle. On the line passing through the points P1 and P2 that isdetermined in the above-described step of determining the attitudeerror, the position of a point at a distance L2 in the direction from P2to P1 is determined and is taken as the actual position of the controlpoint. A vector from the position of the commanded control point to theposition of the actual control point is determined and is taken as theposition error. The position error vector can be split into componentsin the direction of X-axis, Y-axis, Z-axis, and is expressed in the formof (x, y, z). The present invention includes a case where the positionerror vector is expressed in other form.

FIG. 11 is a view showing an embodiment in which, in a spindle rotationtype machine, reference ball 52 is attached to the side of palette 54and displacement detection probe 58 is mounted on the spindle side.Displacement detection probe 58 is constructed such that it is displacedin a direction of the normal at the measurement point of the object tobe measured, and the amount of the displacement is detected.

FIG. 12 is a view showing an embodiment in which the present inventionis applied to a table rotation type machine having rotational feed axesB, C on the table side. In the embodiments shown in FIGS. 11 and 12, theerror of the feed axes can be measured based on the same principle as inthe embodiment shown in FIG. 5.

Next, an example of measurement method for measuring position error 34 aand attitude error 34 b of a machine tool having rotational feed axes B,C on the table side will be described. FIG. 13 is a flow chart showingthis measurement method. In this measurement method, without using anyspecial measurement device, a test piece or a work piece is processed onthe machine, and the processed test piece or work piece is measured witha touch probe mounted on the main spindle to thereby determine theposition error and the attitude error. A cubic test piece is used in thepresent embodiment.

As shown in FIG. 13, rotational feed axes B, C are indexed tosufficiently small rotation angle (in this case, 0 degree for axis B, 0degree for axis C) as required for sufficient precision of the positionerror and the attitude error, and as shown in FIG. 14, each surface oftest piece 60 (frame-like reference processing surface 61) having X, Y,Z-axis directions as the normal is processed without operating therotational feed axes.

The reason why reference processing surface 61 is frame-like is that theattitude error can be thereby accurately determined even when a largenumber of measurement points are used, and the attitude error can bedetermined more accurately by using the entire length of the test pieceto measure the inclination. Here, a ball end mill is used as cuttingtool 63. Reference processing surface 61 is used as the reference formeasuring the attitude error at a specified rotation angle of therotational feed axes.

Then, as shown in FIG. 16, the rotational feed axes are indexed to eachmeasurement point, and three surfaces of the test piece that areorthogonal to each other are processed by operating only the linear feedaxes. As shown in FIG. 15, a specified area is allotted as the area tobe processed in accordance with the indexed angle of the rotational feedaxis.

Next, as shown in FIG. 17, the rotational feed axes are indexed to eachmeasurement point, and P10-P14 of reference processing surface 61 aremeasured with touch probe 64, and actual inclination of the line passingthrough P10 and P11, actual inclination of the line passing through P10and P12, and actual inclination of the line passing through P13 and P14are determined. Difference between three inclinations thus determinedand three theoretical inclinations computed from position command of therotational feed axes at the time of measurement is taken as the attitudeerror.

Then, as shown in FIG. 18, the rotational feed axes are indexed to thereference rotation angle of 0 degree for B-axis and 0 degree for C-axis,and processed surface P15-P20 that are processed at each rotation angleare measured, and difference between the positions of processed surfacesP18-P20 that are processed with the rotational feed axis indexed to 0degree for B-axis and 0 degree for C-axis and the positions of processedsurfaces P15-P17 that are processed with the rotational feed axisindexed to other rotation angle is determined.

In the present invention, the difference of positions and/or differenceof inclinations between the processed surfaces that are processed at onerotation angle and the processed surfaces that are processed at otherrotation angle are referred to as the displacement of the processedsurfaces.

From measurement data of the processed surfaces P18-P20, intersectionpoint P21 of three planes containing processed surfaces P18-P20 when itis assumed that there is no attitude error is determined. Frommeasurement data of processed surfaces P15-P17 and the determinedattitude error, intersection point P22 of three planes containingprocessed surfaces P15-P17 is determined. Difference betweenintersection point P21 and intersection point P22 is taken as theposition error. The present invention includes a case where a test pieceor a work piece is processed with a machine tool having rotational feedaxes on the main spindle side, and the position error and the attitudeerror are determined from measurement result of the processed surfaces.

Error determined by the above-described method is associated with thepositions of linear feed axes X, Y, Z and the rotation angles ofrotational feed axes B, C, as shown in FIG. 4, and is stored as an errormap.

Next, a correction method for correcting the position command using anerror map including the position error and the attitude error will bedescribed taking a spindle rotation-type machine which has rotationalfeed axes A, C (see FIGS. 1 and 2) as an example.

First, the command position of processing program 21 is read by readingand interpreting section 22, and interpolation section 23 determines thecommand pulse for each of feed axes X, Y, Z, A, C for every specifiedinterpolation period.

Then, position command recognition means 24 recognize from the commandpulses the position command for each of feed axes X, Y, Z, A, C forevery specified interpolation period.

If the position of each feed axis in the position command is the same asthe position of the measurement point stored in error data storagesection 25, error data 34 are obtained, and correction data aredetermined based on the obtained error data. If the position of eachfeed axis in the position command is not the same as the position of themeasurement point stored in error data storage section 25, the errordata are obtained from the error data of nearby measurement point usingknown interpolation method, and correction data are determined based onthe error data thus interpolated. Correction data thus determined areadded to the position command to obtain new position command for everyinterpolation period. The position command is corrected in this manner,and each of the feed axes can be positioned with high precision.

Next, a correction method for correcting the position command byexpressing in 3-dimensional coordinate values the correction value thathas been computed by the correction data computing section 26, will bedescribed. In case, for example, where, with C axis set at the rotationangle of 0 degree, an attitude error appears in a direction of B-axiswhich is not proper to the machine, there is a problem that therotational feed axes need to be rotated considerably in order to correctthe attitude error in a direction of B-axis. This problem is referred toas singular point problem in the present invention. The correctionmethod described below is a correction method for circumventing thissingular point problem. B-axis is an axis of a rotational feed axis thatis parallel to Y-axis.

FIG. 19 is a flow chart showing this correction method. Computationformula for determining the position correction vector based on theattitude and attitude error of a tool, the position and position errorof a tool, and the projecting length of a tool according to this methodis shown below, where:

L: distance from the command point to the position of tool tip,

[I, J, K]: command attitude of the tool,

[dI, dJ, dK]: attitude error,

[dX1, dY1, dZ1]: position error,

[dX2, dY2, dZ2]: position error of the tool tip produced by the attitudeerror,

[dX3, dY3, dZ3]: position error of the tool tip,

dX2=L×(tan(J+dJ)/((tan(I+dI))²+(tan(J+dJ))²+1)^(1/2)−(tan(J)/((tan(I))²+(tan(J))²+1)^(1/2))

dY2=L×(tan(I+dI)/((tan(I+dI))²+(tan(J+dJ))²+1)^(1/2)−(tan(I)/((tan(I))²+(tan(J))²+1)^(1/2))

dZ2=L×(1/((tan(I+dI))²+(tan(J+dJ))²+1)^(1/2)−(1/((tan(I))²+(tan(J))²+1)^(1/2))

dX3=dX1+dX2

dY3=dY1+dY2

dZ3=dZ1+dZ2

First, at step S0, the command position and the command attitude thatare commanded by the position command outputted from interpolationsection 23 are recognized. At step S1, error data 34 corresponding tothe command position are obtained from the error map. At step S2, theposition correction vector for correcting the position error is computedfrom position error 34 a of error data 34.

On the other hand, from attitude error 34 b of error data 34, at stepS5, the attitude correction value is computed. At step S6, the attitudecorrection value obtained at step S5 is added to the command attituderead out at step S3 to determine the attitude after correction. At stepS7, from the attitude after correction obtained at step S6 and theprojecting length of the tool, the command point after correction isdetermined.

At step S4, from the command attitude read out at step S3 and theprojecting length of the tool, the command point before correction isdetermined. At step S8, position correction vector of the command pointfor correcting the attitude error is computed by subtracting the commandpoint before correction obtained at step S4 from the command point aftercorrection obtained at step S7. This is referred to as the attitudecorrection vector.

The attitude correction vector is a vector representing the magnitudeand direction of the displacement of the tool tip when, with the basalend of the tool held by the main spindle as the control point, therotational feed axes are rotated so as to correct the attitude errorwith the control point as the fulcrum.

Finally, at step S9, the attitude correction vector obtained at step S8and the position correction vector obtained at step S2 are added.

In the present invention, the command point refers to the position ofthe tool tip (tool tip position), and the tool tip position means theactual position of the tool tip, the position of the processing point ofthe tool tip portion, the center of the semi-sphere of the tip portionof a ball end mill, etc.

As has been described above, the error of the tool tip position iscorrected only by the movement of the linear feed axes, so that therotational feed axes are not rotated during the correction of attitudeerror 34 b, and the singular point problem can be circumvented.

Thus, in accordance with the present embodiment, the position error andthe attitude error of a machine tool having plural rotational feed axescan be measured and an error map can be prepared. Since, in the errormap thus prepared, the position error and the attitude error are storedas separate error data, the position command can be corrected based onthe error data, and the tool tip can be positioned to a target positionwith high precision to permit high precision processing.

The present invention is not limited to the embodiments described above,but can be implemented in various modifications without departing fromthe scope and spirit of the invention. For example, in the presentembodiment, numerical control device 20 comprises a computation sectionthat computes position error and the attitude error at the measurementpoints based on the measurement data obtained by measurement device 50and the coordinate values of the measurement points, and error datastorage means 25 for storing the position error and the attitude errorcomputed by the computation section in correspondence to the position ofthe linear feed axes and the rotation angle of the rotational feed axes.It is also possible, in place of numerical control device 20 to usepersonal computer or other device for the computation section or theerror data storage means.

1. A method for preparing an error map of a numerically controlledmachine tool which has a linear feed axis and a rotational feed axis andin which a main spindle and a table are movable relative to each other,said method comprising steps of: defining a plurality of measurementpoints in a movable range of said linear feed axis and said rotationalfeed axis; measuring relative position and relative attitude of saidmain spindle relative to said table at each measurement point;determining position error and/or attitude error at each measurementpoint; and storing said position error and said attitude error incorrespondence to a position of said linear feed axis and a rotationangle of said rotational feed axis.
 2. The method for preparing an errormap of a numerically controlled machine tool according to claim 1,wherein, in said step of defining a plurality of measurement points,plural measurement regions are defined in said movable range of saidlinear feed axis, and said measurement points are defined in eachmeasurement region such that at least one of said measurement points ineach measurement region has a same coordinate position of said linearfeed axis as a measurement point in an adjacent measurement region. 3.The method for preparing an error map of a numerically controlledmachine tool according to claim 1 or 2, wherein, in said step ofdefining a plurality of measurement points, said measurement points aredefined such that a separation between adjoining measurement points isconstant everywhere, or a difference of position error or attitude errorbetween adjoining measurement points is constant everywhere.
 4. Themethod for preparing an error map of a numerically controlled machinetool according to any one of claims 1 to 2, wherein, in said step ofmeasuring said relative position and said relative attitude, ameasurement device which has a reference ball of known outer dimensionprovided on one of said main spindle and said table and a displacementsensor provided on the other are used, and while said linear feed axisis controlled such that a relative position of a center of saidreference ball relative to said displacement sensor does not changetheoretically when said rotational feed axis is operated, saidrotational feed axis is positioned to plural measurement points tomeasure a displacement of position of said reference ball with saiddisplacement sensor at each measurement point and to determine saidrelative position and said relative attitude from said displacement ofposition thus measured and a coordinate value at a time of measurement.5. The method for preparing an error map of a numerically controlledmachine tool according to any one of claims 1 to 2, wherein, in saidstep of measuring said relative position and said relative attitude,said rotational feed axis is positioned to plural rotation angles toprocess a test piece or work piece attached to said table, and adisplacement of position of a processed surface obtained when saidrotational feed axis is positioned to one of said plural rotation anglesand said test piece or work piece is processed at said one rotationangle and a processed surface obtained when processed at other rotationangle is measured, and said relative position and said relative attitudeare determined from said displacement of position thus measured andcoordinate values at a time of measurement.
 6. The method for preparingan error map of a numerically controlled machine tool according to anyone of claims 1 to 2, wherein, in said step of measuring said relativeposition and said relative attitude, said rotational feed axis ispositioned to plural rotation angles and three surfaces of a test pieceor work piece attached to said table are processed at respectiverotation angles, and a difference of position and a difference ofinclination between three processed surfaces obtained when saidrotational feed axis is positioned to one of said plural rotation anglesand said test piece or work piece is processed at said one rotationangle and three processed surfaces obtained when processed at otherrotation angle are measured with a touch probe attached to said mainspindle, and said relative position and said relative attitude aredetermined from said difference of position and said difference ofinclination thus measured and machine coordinate values at a time ofmeasurement.
 7. A method for preparing an error map of a numericallycontrolled machine tool which has a linear feed axis and a rotationalfeed axis and in which a main spindle and a table are movable relativeto each other, said method comprising steps of: defining a plurality ofmeasurement points in a movable range of said linear feed axis and saidrotational feed axis; positioning said rotational feed axis to pluralrotation angles at said measurement points and processing three mutuallyorthogonal surfaces of a test piece or work piece in a shape ofrectangular parallelepiped attached to said table at each of saidrotation angles thus positioned, measuring an inclination of a processedsurfaces obtained when said rotational feed axis is positioned to one ofsaid plural rotation angles and said test piece or work piece isprocessed at one rotation angle relative to that positioned to otherrotation angle to determine an attitude error at each rotation angle,measuring said processed surfaces of said test piece or work piece todetermine, for each rotation angle, a position of intersection point ofthree planes containing said processed surfaces that are processed atsaid rotation angle, determining a position error at each measurementpoint from difference of position between an intersection point of threeplanes containing said processed surfaces obtained when said rotationalfeed axis is positioned to said one rotation angle and said test pieceor work piece is processed at said one rotation angle and anintersection point of three planes containing said processed surfacesobtained when positioned and processed at an other rotation angle, andsaid attitude error, and storing said position error and said attitudeerror in correspondence to a position of said linear feed axis and saidrotation angle of said rotational feed axis.
 8. A method for preparingan error map of a numerically controlled machine tool which has a linearfeed axis and a rotational feed axis and in which a main spindle and atable are movable relative to each other, said method comprising:defining a plurality of measurement points in a movable range of saidlinear feed axis and said rotational feed axis; positioning saidrotational feed axis to plural rotation angles at said measurementpoints and processing three mutually orthogonal surfaces of a test pieceor work piece in a shape of rectangular parallelepiped attached to saidtable at each of said rotation angles thus positioned, measuringprocessed surfaces of said test piece or work piece to determine, foreach rotation angle, an inclination of said processed surfaces and aposition of intersection point of three planes containing said processedsurfaces that are processed at a rotation angle, determining an attitudeerror at each measurement point from a difference between an inclinationof said processed surfaces obtained when said rotational feed axis ispositioned to one of said plural rotation angles and said test piece orwork piece is processed at one rotation angle and an inclination of saidprocessed surfaces obtained when positioned and processed at otherrotation angle, determining a position error at each measurement pointfrom a difference of position between an intersection point of threeplanes containing said processed surfaces obtained when said rotationalfeed axis is positioned to said one rotation angle and said test pieceor work piece is processed at said one rotation angle and anintersection point of three planes containing said processed surfacesobtained when positioned and processed at other rotation angle, and saiddetermined attitude error, and storing said position error and saidattitude error in correspondence to a position of said linear feed axisand said rotation angle of said rotational feed axis.
 9. A device forpreparing an error map of a numerically controlled machine tool whichhas a linear feed axis and a rotational feed axis and in which a mainspindle and a table are movable relative to each other, said devicecomprising: a measurement device which has a reference ball provided onone of said main spindle and said table and a sensor provided on theother for measuring a position of said reference ball with said sensorat desired measurement point, a computation section that computes aposition error and an attitude error for said measurement point based onmeasurement data measured with said measurement device and coordinatevalues of said measurement point, a storage section that stores saidposition error and said attitude error computed by said computationsection in correspondence to a position of said linear feed axis and arotation angle of said rotational feed axis at said measurement point.10. A numerically controlled machine tool which has a linear feed axisand a rotational feed axis and in which a main spindle and a table aremovable relative to each other, said numerically controlled machine toolhaving an error map preparation function comprising: a measurementdevice which has a reference ball provided on one of said main spindleand said table and a sensor provided on the other for measuring aposition of said reference ball with said sensor at desired measurementpoint, a computation section that computes a position error and anattitude error for said measurement point based on measurement datameasured with said measurement device and coordinate values of saidmeasurement point, and a storage section that stores said position errorand said attitude error computed by said computation section incorrespondence to a position of said linear feed axis and a rotationangle of said rotational feed axis at said measurement point.
 11. Anumerically controlled machine tool which has a linear feed axis and arotational feed axis and in which a main spindle and a table are movablerelative to each other, said numerically controlled machine tool havingan error map preparation function comprising: a test piece or work pieceattached to said table, a measurement device having a sensor provided onsaid main spindle for measuring processed surfaces of said test piece orwork piece with said sensor at a desired measurement point, acomputation section that computes a position error and an attitude errorfor said measurement point based on measurement data measured with saidmeasurement device and coordinate values of said measurement point, astorage section for storing said position error and said attitude errorcomputed by said computation section in correspondence to a position ofsaid linear feed axis and a rotation angle of said rotational feed axisat said measurement point.
 12. The numerically controlled machine toolhaving the error map preparation function according to claim 10 or 11,further comprising: a correction section which corrects a commandposition or position command of said linear feed axis or said rotationalfeed axis based on said position error and said attitude error stored insaid storage section.
 13. The method for preparing an error map of anumerically controlled machine tool according to claim 3, wherein, insaid step of measuring said relative position and said relativeattitude, a measurement device which has a reference ball of known outerdimension provided on one of said main spindle and said table and adisplacement sensor provided on the other are used, and while saidlinear feed axis is controlled such that a relative position of a centerof said reference ball relative to said displacement sensor does notchange theoretically when said rotational feed axis is operated, saidrotational feed axis is positioned to plural measurement points tomeasure a displacement of position of said reference ball with saiddisplacement sensor at each measurement point and to determine saidrelative position and said relative attitude from said displacement ofposition thus measured and a coordinate value at a time of measurement.14. The method for preparing an error map of a numerically controlledmachine tool according to claim 3, wherein, in said step of measuringsaid relative position and said relative attitude, said rotational feedaxis is positioned to plural rotation angles to process a test piece orwork piece attached to said table, and a displacement of position of aprocessed surface obtained when said rotational feed axis is positionedto one of said plural rotation angles and said test piece or work pieceis processed at said one rotation angle and a processed surface obtainedwhen processed at other rotation angle is measured, and said relativeposition and said relative attitude are determined from saiddisplacement of position thus measured and coordinate values at a timeof measurement.
 15. The method for preparing an error map of anumerically controlled machine tool according to claim 3, wherein, insaid step of measuring said relative position and said relativeattitude, said rotational feed axis is positioned to plural rotationangles and three surfaces of a test piece or work piece attached to saidtable are processed at respective rotation angles, and a difference ofposition and a difference of inclination between three processedsurfaces obtained when said rotational feed axis is positioned to one ofsaid plural rotation angles and said test piece or work piece isprocessed at said one rotation angle and three processed surfacesobtained when processed at other rotation angle are measured with atouch probe attached to said main spindle, and said relative positionand said relative attitude are determined from said difference ofposition and said difference of inclination thus measured and machinecoordinate values at a time of measurement.